Skip to content

Commit 20802bc

Browse files
authored
Minor development and bugfixes (#135)
* enable SimpleCut title reading * bugfix of versioning machinery: create diff file of AT, not dependent package * add .vscode to .gitignore * fix examples/WritingMacro.C according to PR #134 #134 --------- Co-authored-by: Oleksii Lubynets <O.Lubynets@gsi.de>
1 parent d638825 commit 20802bc

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ install_c++17/*
44
build_c++17/*
55
.project
66
.idea/*
7+
.vscode/*
78
Doxygen/*
89

910

cmake/AnalysisTreeHashWriter.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if [ -d ".git" ]; then
1515
GITTAG=$(git describe --tags)
1616
GITCOMMIT=$(git rev-parse HEAD)
1717
GITSTATUS=$(git status --porcelain)
18-
cd -
1918
echo "export ANALYSIS_TREE_TAG=\"${GITTAG}\"" >> $FILE_HASH
2019
echo "export ANALYSIS_TREE_COMMIT_HASH=${GITCOMMIT}" >> $FILE_HASH
2120
if [ -z "${GITSTATUS}" ]; then
@@ -25,8 +24,12 @@ if [ -d ".git" ]; then
2524
git diff >> $FILE_DIFF
2625
fi
2726
else
28-
cd -
2927
echo "export ANALYSIS_TREE_TAG=NOT_A_GIT_REPO" >> $FILE_HASH
3028
echo "export ANALYSIS_TREE_COMMIT_HASH=NOT_A_GIT_REPO" >> $FILE_HASH
3129
echo "export ANALYSIS_TREE_COMMIT_ORIGINAL=NOT_A_GIT_REPO" >> $FILE_HASH
3230
fi
31+
cd -
32+
mv $SRC_DIR/$FILE_HASH .
33+
if [ -f $SRC_DIR/$FILE_DIFF ]; then
34+
mv $SRC_DIR/$FILE_DIFF .
35+
fi

examples/WritingMacro.C

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ void WritingMacro(int nEvents = 1000,
111111
simtrack->Init(config_.GetBranchConfig(sim_tracks_->GetId()));
112112

113113
// Set default fields of it
114+
simtrack->SetIsAllowedSetMassAndChargeExplicitly();
114115
simtrack->SetMomentum(px_sim, py_sim, pz_sim);
115116
simtrack->SetPid(3122);
116117
simtrack->SetMass(1.115683);

infra/SimpleCut.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ class SimpleCut {
9494

9595
void Print() const;
9696

97+
void SetTitle(const std::string& title) { title_ = title; }
98+
const std::string& GetTitle() const { return title_; }
99+
97100
std::vector<Variable>& Variables() { return vars_; }
98101
ANALYSISTREE_ATTR_NODISCARD const std::vector<Variable>& GetVariables() const { return vars_; }
99102
ANALYSISTREE_ATTR_NODISCARD const std::set<std::string>& GetBranches() const { return branch_names_; }

0 commit comments

Comments
 (0)