Skip to content

Commit bda2ca8

Browse files
authored
Merge pull request #31 from Mu2e/pgirotti/gr4process
2 parents a264ab5 + 5cf6844 commit bda2ca8

File tree

2 files changed

+56
-57
lines changed

2 files changed

+56
-57
lines changed

scripts/calo_gr4_generate_txt.C

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#include <sstream>
88
#include <vector>
99

10-
gInterpreter->GenerateDictionary("vector<vector<float>>", "vector");
11-
1210
void saveTimeDataToFile(std::ofstream& outFile,
1311
const std::string& inputFileName,
1412
int option) {
@@ -65,9 +63,9 @@ void saveTimeDataToFile(std::ofstream& outFile,
6563
std::ostringstream lineStream;
6664
lineStream << ewt;
6765

68-
std::cout << std::endl;
69-
// Loop over each sorted SiPM ID and write the data in the required format
70-
// for (size_t idx : indices) {
66+
// std::cout << std::endl;
67+
// Loop over each sorted SiPM ID and write the data in the required format
68+
// for (size_t idx : indices) {
7169
for(auto pair : timeMap) {
7270
if(option == 1) {
7371
if(pair.second.size() >= 2) {
@@ -93,9 +91,9 @@ void saveTimeDataToFile(std::ofstream& outFile,
9391
file->Close();
9492
}
9593

96-
int Calo_generate_txt(const std::string& inputFileName,
97-
const std::string& outputName,
98-
int option) {
94+
int calo_gr4_generate_txt(const std::string& inputFileName,
95+
const std::string& outputName,
96+
int option) {
9997
// Create the output file name
10098
std::string outputFileName = outputName;
10199
std::ofstream outFile(outputFileName, std::ios::trunc);
@@ -105,6 +103,8 @@ int Calo_generate_txt(const std::string& inputFileName,
105103
return -1;
106104
}
107105

106+
gInterpreter->GenerateDictionary("vector<vector<float>>", "vector");
107+
108108
// Section to insert header
109109
if(option == 1) { // Two events
110110
outFile << "Calo_" + inputFileName +

test/iercAnalysis.fcl

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,60 @@
33

44
process_name : iercAnalysis
55

6-
source : {
7-
module_type : RootInput
8-
fileNames : @nil
9-
maxEvents : -1
6+
source : {
7+
module_type:
8+
RootInput fileNames : @nil maxEvents : -1
109
}
1110

1211
services : {
13-
14-
#@local::Services.Reco
15-
GeometryService : {inputFile: "Offline/Mu2eG4/geom/geom_common.txt" bFieldFile: "Offline/Mu2eG4/geom/bfgeom_reco_v01.txt" simulatedDetector : {tool_type: "Mu2e"}}
16-
ConditionsService : { conditionsfile : "Offline/ConditionsService/data/conditions_01.txt"}
17-
GlobalConstantsService : {inputFile : "Offline/GlobalConstantsService/data/globalConstants_01.txt"}
18-
DbService : @local::DbEmpty
19-
ProditionsService : @local::Proditions
20-
TimeTracker: {}
12+
#@ local::Services.Reco GeometryService : {
13+
inputFile:
14+
"Offline/Mu2eG4/geom/geom_common.txt" bFieldFile
15+
: "Offline/Mu2eG4/geom/bfgeom_reco_v01.txt" simulatedDetector : {
16+
tool_type:
17+
"Mu2e"
18+
}
19+
}
20+
ConditionsService: {
21+
conditionsfile:
22+
"Offline/ConditionsService/data/conditions_01.txt"
23+
}
24+
GlobalConstantsService: {
25+
inputFile:
26+
"Offline/GlobalConstantsService/data/globalConstants_01.txt"
27+
}
28+
DbService:
29+
@local::DbEmpty ProditionsService : @local::Proditions TimeTracker : {
30+
}
2131
}
2232

2333
physics : {
2434

25-
producers : {
26-
27-
genFrags : {
28-
module_type : ArtFragmentsFromDTCEvents
29-
diagLevel : 0
30-
makeCaloFrag : 1
31-
makeTrkFrag : 0
32-
makeCRVFrag : 0
33-
makeSTMFrag : 0
34-
}
35-
36-
CaloDigiIERC : {
37-
module_type : CaloDigiFromFragments
38-
dataType : 1
39-
diagLevel : 0
40-
caloTag : "genFrags"
41-
useOfflineID : false
42-
useDTCROCID : true
43-
}
44-
}
45-
46-
analyzers : {
47-
pulseIERCAnalysis : {
48-
module_type : CaloiercAnalyzer
49-
caloDigiModuleLabel : "CaloDigiIERC"
50-
caloDigiInstanceLabel : ""
51-
verbosity : 0
52-
splineFilename : "/home/mu2edaq/dev_calo/pgirotti_testing/srcs/otsdaq-mu2e-calorimeter/test/ierc_splines_gr4_106291.root"
53-
}
54-
}
55-
56-
t1 : [ genFrags , CaloDigiIERC ]
57-
e1 : [ pulseIERCAnalysis ]
58-
59-
trigger_paths : [t1]
60-
end_paths : [e1]
35+
producers : {
36+
37+
genFrags : {
38+
module_type : ArtFragmentsFromDTCEvents diagLevel : 0 makeCaloFrag : 1
39+
makeTrkFrag : 0 makeCRVFrag : 0 makeSTMFrag : 0
40+
}
41+
42+
CaloDigiIERC : {
43+
module_type : CaloDigiFromFragments dataType : 1 diagLevel : 0
44+
caloTag : "genFrags" useOfflineID : false useDTCROCID : true
45+
}
46+
}
47+
48+
analyzers : {
49+
pulseIERCAnalysis : {
50+
module_type : CaloiercAnalyzer caloDigiModuleLabel : "CaloDigiIERC"
51+
caloDigiInstanceLabel : "" verbosity : 0
52+
splineFilename : "/home/mu2eshift/gr4_process/srcs/otsdaq-mu2e-calorimeter/"
53+
"test/ierc_splines_gr4_106291.root"
54+
}
55+
}
56+
57+
t1 : [ genFrags, CaloDigiIERC ] e1 : [pulseIERCAnalysis]
58+
59+
trigger_paths : [t1] end_paths : [e1]
6160
}
6261

63-
services.scheduler.wantSummary: true
62+
services.scheduler.wantSummary : true

0 commit comments

Comments
 (0)