41 {
42
43
45
47 if (chain == nullptr) {
48 return 1;
49 }
50
52
53
54
55
56
57
60
62
63
64
65
66
67
68
71
73
74
77
78 event.getEntry(entry);
79 std::cout <<
" :: Entry :: " <<
entry << std::endl;
80
83
84 if (
event.retrieve(electronCont,
"Electrons").isSuccess() ){
85 std::cout << "The electron size is : " << electronCont->size() << std::endl;
87 std::cout << "----------------- CaloRings info ------------------- " << std::endl;
88 std::cout <<
"isAvailable is : " << ringsReader.isAvailable(*
electron) << std::endl;
89 std::cout <<
"(eta,phi) is : (" <<
electron->eta() <<
"," <<
electron->phi() <<
") | cluster pt is : " <<
electron->caloCluster()->pt() << std::endl;
90 if ( ringsReader.isAvailable(*
electron) ) {
91
93 std::cout << "The vectorEL size is : " << caloRingsELVec.size() << std::endl;
95 if ( clRingsEL.isValid() ) {
96 (*clRingsEL)->print(std::cout);
97 } else {
98 std::cout << "Retrieved invalid link!" << std::endl;
99 }
100 }
102 std::cout <<
"The vector size is : " <<
vec.size() << std::endl;
103 }
104 std::cout << "----------------- Testing cluster ------------------- " << std::endl;
106 if ( looseDec.isAvailable( *
electron) ){
108 std::cout << "Loose Decision is: " << std::boolalpha
109 << dec << std::noboolalpha << std::endl;
112 std::cout << "Medium Decision is: " << std::boolalpha
113 << dec << std::noboolalpha << std::endl;
116 std::cout << "Tight Decision is: " << std::boolalpha
117 << dec << std::noboolalpha << std::endl;
120 std::cout <<
"Loose Output is: " <<
output << std::endl;
123 std::cout <<
"Medium Output is: " <<
output << std::endl;
126 std::cout <<
"Tight Output is: " <<
output << std::endl;
127 }
128 }
129 } else {
130 std::cout << "Could not retrieve electrons container" << std::endl;
131 }
132
133 std::cout << "----------------- Reading directly from ElectronCaloRings ------------------- " << std::endl;
134
135 if (
event.retrieve(electronCaloRings,
"ElectronCaloRings").isSuccess() ){
136
138 rings->print(std::cout);
139 }
140 } else {
141 std::cout << "ElectronCaloRings. nao funciona" << std::endl;
142 }
143 }
144
145 auto metaChain =
getChain(argc, argv,
"MetaData");
146
147 std::cout << "MetaEvent:" << std::endl;
148 metaChain->Print();
149
153
155
156 size_t nEntriesMeta = metaChain->GetEntries();
157 for (
size_t entry = 0;
entry < nEntriesMeta;
entry++) {
158 metaEvent.getEntry(entry);
159 std::cout <<
" :: Entry :: " <<
entry <<
"/" << nEntriesMeta << std::endl;
160 std::cout << "----------------- Reading RingSetConfs ------------------- " << std::endl;
161 if ( metaEvent.retrieve(electronRingSetConf,"ElectronRingSetsConf").isSuccess() ){
162 try {
164 ringsConf->print(std::cout);
165 }
166 std::cout << "----------------- Printing its RawConfCollection ------------------- " << std::endl;
170 }
catch (
const std::runtime_error &
e) {
171 std::cout <<
"Coudln't read RingSetConfs, reason: " <<
e.what() << std::endl;
172 }
173 } else {
174 std::cout << "ElectronRingSetsConf not available." << std::endl;
175 }
176 if ( metaEvent.retrieve(photonRingSetConf,"PhotonRingSetsConf").isSuccess() ){
177 try {
179 ringsConf->print(std::cout);
180 }
181 std::cout << "----------------- Printing its RawConfCollection ------------------- " << std::endl;
185 }
catch (
const std::runtime_error &
e) {
186 std::cout <<
"Coudln't read RingSetConfs, reason: " <<
e.what() << std::endl;
187 }
188 } else {
189 std::cout << "PhotonRingSetsConf not available." << std::endl;
190 }
191 }
192
193 std::cout << "before close " << std::endl;
194
195
196
197
198 std::cout << "Finishing..." << std::endl;
199}
std::vector< size_t > vec
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
ElementLink implementation for ROOT usage.
SG::ConstAccessor< T, ALLOC > ConstAccessor
Helper class to provide constant type-safe access to aux data.
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
static void print(const RawConf &raw, std::ostream &stream)
Prints rawConf.
static void getRawConfCol(RawConfCollection &rawConfCol, const RingSetConfContainer_v1 *container)
Retrieve RawConfCollection from RingSetConf container.
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
TChain * getChain(int argc, char *argv[], const char *chainName="CollectionTree")
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
RingSetConf_v1 RingSetConf
Definition of the current "RingSetConf version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
std::vector< ElementLink< CaloRingsContainer > > CaloRingsLinks
ElementLink type pointing at such objects.
CaloRings_v1 CaloRings
Definition of the current "CaloRings version".
const caloRingsReader_t & getCaloRingsReader()
Get CaloRings accessor with read only permissions.
RingSetConfContainer_v1 RingSetConfContainer
Definition of the current "RingSetConf container version".
CaloRingsContainer_v1 CaloRingsContainer
Definition of the current "CaloRings container version".
Electron_v1 Electron
Definition of the current "egamma version".