#include <EventHandle.h>
Inheritance diagram for edm::EventHandle:

Definition at line 16 of file EventDataModel/EventHandle.h.
|
|
Definition at line 49 of file EventDataModel/EventHandle.h. Referenced by Load(). 00049 {
00050 kHeaderID,
00051 kMCID,
00052 kDetSimID,
00053 kDAQID,
00054 kRawID,
00055 kRawAuxID,
00056 kCalID,
00057 kRecoID,
00058 kUserID,
00059 kSummaryID,
00060 kNBranch
00061 } BranchID_t;
|
|
|
Construct an empty event handle Reimplemented in io::EventHandle. Definition at line 22 of file EventDataModel/EventHandle.cxx. References fIsLoaded. 00022 : 00023 fObjectCnt(TProcessID::GetObjectCount()), 00024 fEvent (new Event ), 00025 fMC (fEvent->fMC ), 00026 fDetSim (fEvent->fDetSim), 00027 fDAQ (fEvent->fDAQ ), 00028 fRaw (fEvent->fRaw ), 00029 fRawAux (fEvent->fRawAux), 00030 fCal (fEvent->fCal ), 00031 fReco (fEvent->fReco ), 00032 fUser (fEvent->fUser ), 00033 fSummary(fEvent->fSummary) 00034 { 00035 for (int i = 0; i<kNBranch; ++i) fIsLoaded[i] = false; 00036 }
|
|
|
Clear all data arrays and delete the event Reimplemented in io::EventHandle. Definition at line 42 of file EventDataModel/EventHandle.cxx. References edm::DataBucket::ClearArrays(), fCal, fDAQ, fDetSim, fMC, fRaw, fRawAux, fReco, fSummary, and fUser. 00043 {
00044 fMC. ClearArrays();
00045 fDetSim. ClearArrays();
00046 fDAQ. ClearArrays();
00047 fRaw. ClearArrays();
00048 fRawAux. ClearArrays();
00049 fCal. ClearArrays();
00050 fReco. ClearArrays();
00051 fUser. ClearArrays();
00052 fSummary.ClearArrays();
00053 delete fEvent;
00054 }
|
|
|
Return the data bucket identified by branchID
Definition at line 135 of file EventDataModel/EventHandle.cxx. References IsLoaded(), kCalID, kDAQID, kDetSimID, kMCID, kRawAuxID, kRawID, kRecoID, kSummaryID, kUserID, and Load(). Referenced by Cal(), DAQ(), DetSim(), MC(), Raw(), RawAux(), Reco(), Summary(), and User(). 00136 {
00137 if (this->IsLoaded(branchID)==false) this->Load(branchID);
00138
00139 switch (branchID) {
00140 case kMCID: return fMC;
00141 case kDetSimID: return fDetSim;
00142 case kDAQID: return fDAQ;
00143 case kRawID: return fRaw;
00144 case kRawAuxID: return fRawAux;
00145 case kCalID: return fCal;
00146 case kRecoID: return fReco;
00147 case kUserID: return fUser;
00148 case kSummaryID: return fSummary;
00149 default: abort();
00150 }
00151
00152 // Provide return code to quiet compilers
00153 static DataBucket empty(0);
00154 return empty;
00155 }
|
|
|
Definition at line 164 of file EventDataModel/EventHandle.cxx. References Bucket(), and kCalID. 00164 { return this->Bucket(kCalID); }
|
|
|
Definition at line 184 of file EventDataModel/EventHandle.cxx. References Bucket(), and kCalID. Referenced by clusterss::CompareClusters::Ana(), clusterss::ClusterCheck::Ana(), cellhitmerge::CellHitMerge::Ana(), subshower::RecoSubShower::FormStripList(), evd::RecoBaseDrawer::GetCellHits(), main(), spider::SpiderWeb::Reco(), clusterss::MakeClusterSS::Reco(), trk::DemoShell::Reco(), cluster::Clusterer::Reco(), clust::Clust2D::Reco(), trk::CirceFit::Reco(), cellhitmerge::CellHitMerge::Reco(), calhit::CalHit::Reco(), and calhit::CalHit::RoughReco(). 00184 {
00185 return this->Bucket(kCalID);
00186 }
|
|
|
Mark all branches as unloaded and clear up the event Definition at line 60 of file EventDataModel/EventHandle.cxx. References edm::Event::Clear(), ClearLoadFlags(), and fEvent. Referenced by io::ReadWriteModule::AddFile(), main(), evgen::SingleGen::Reco(), evgen::GENIEGen::Reco(), and evgen::CosmicsGen::Reco(). 00061 {
00062 this->ClearLoadFlags();
00063 fEvent->Clear();
00064 }
|
|
|
Mark all branches as unloaded. Next read attempt will have to go back to disk.
Definition at line 73 of file EventDataModel/EventHandle.cxx. References fIsLoaded, and fObjectCnt. Referenced by Clear(), and io::ReadWriteModule::Reload(). 00074 {
00075 int isave=0;
00076 TProcessID::SetObjectCount(fObjectCnt);
00077
00078 for (int i=0; i<kNBranch; ++i) { // Mark all branches as unloaded
00079 if (fIsLoaded[i] == true) isave |= (1 << i);
00080 fIsLoaded[i] = false;
00081 }
00082 return isave;
00083 }
|
|
|
Definition at line 161 of file EventDataModel/EventHandle.cxx. References Bucket(), and kDAQID. 00161 { return this->Bucket(kDAQID); }
|
|
|
Definition at line 175 of file EventDataModel/EventHandle.cxx. References Bucket(), and kDAQID. Referenced by clusterss::CompareClusters::Ana(), clusterss::ClusterCheck::Ana(), util::EDMUtils::Detector(), util::EDMUtils::GetGeometry(), main(), evgen::SingleGen::Reco(), clusterss::MakeClusterSS::Reco(), hdr::JobRecord::Reco(), evgen::GENIEGen::Reco(), evgen::CosmicsGen::Reco(), and cellhitmerge::CellHitMerge::Reco(). 00175 {
00176 return this->Bucket(kDAQID);
00177 }
|
|
|
Definition at line 160 of file EventDataModel/EventHandle.cxx. References Bucket(), and kDetSimID. 00160 { return this->Bucket(kDetSimID); }
|
|
|
Definition at line 172 of file EventDataModel/EventHandle.cxx. References Bucket(), and kDetSimID. Referenced by mcchk::CosmicAna::Ana(), clusterss::ClusterCheck::Ana(), doFLSHits(), doStdHep(), evd::Display3D::DrawMCHits(), evd::DetectorView::DrawMCTruth(), sim::TruthFilter::GetFilteredHits(), vali::Validator::GetFLSHInfo(), evd::SimulationDrawer::GetFLSHits(), main(), sim::TruthFilter::Reco(), photrans::SimpleTransport::Reco(), and rsim::SimpleReadout::Reco(). 00172 {
00173 return this->Bucket(kDetSimID);
00174 }
|
|
|
Return the event header, load if necesary.
Definition at line 109 of file EventDataModel/EventHandle.cxx. References fEvent, edm::Event::fHeader, IsLoaded(), kHeaderID, and Load(). 00110 {
00111 if (this->IsLoaded(kHeaderID) == false) this->Load(kHeaderID);
00112
00113 return *(fEvent->fHeader);
00114 }
|
|
|
Return the event header, load if necesary
Definition at line 121 of file EventDataModel/EventHandle.cxx. References fEvent, edm::Event::fHeader, IsLoaded(), kHeaderID, and Load(). Referenced by jobc::ResourceSummary::Ana(), mcchk::CosmicAna::Ana(), clusterss::CompareClusters::Ana(), clusterss::ClusterCheck::Ana(), jobc::Job::CheckStatus(), doHeader(), jobc::Sequence::Exec(), subshower::RecoSubShower::FitEM(), subshower::RecoSubShower::FormStripList(), util::EDMUtils::GetCalibrator(), util::EDMUtils::GetCMap(), GetEventNumbers(), util::EDMUtils::GetGeometry(), gsGetEventNumbers(), main(), evdb::PrintDialog::PrintDialog(), clusterss::MakeClusterSS::Reco(), and io::ReadWriteModule::UpdateEventNumbers(). 00122 {
00123 if (this->IsLoaded(kHeaderID) == false) this->Load(kHeaderID);
00124
00125 return *(fEvent->fHeader);
00126 }
|
|
|
Is a particular branch loaded
Definition at line 203 of file EventDataModel/EventHandle.cxx. References fIsLoaded. Referenced by Bucket(), Header(), and Load(). 00204 {
00205 if (id < kNBranch && id >= 0) return fIsLoaded[id];
00206 abort();
00207 return false;
00208 }
|
|
|
Loads one branch if branchID < EDMEventHandle::kNBranch, or loads entire event if branchID == kNBranch Implemented in io::EventHandle. Definition at line 214 of file IoModules/EventHandle.cxx. References BranchID_t, IsLoaded(), kNBranch, io::EventHandle::Load(), and SetLoaded(). Referenced by Bucket(), and Header(). 00215 {
00216 // Do not load anything if a ROOT input file is not specified
00217 if (!fInputFile) return 0;
00218 assert ((branchID >= 0) && (branchID <= kNBranch));
00219
00220 // If branchID is maxed out, load all the branches. Load one-by-one
00221 // to avoid over-writing branched already loaded.
00222 if (branchID == kNBranch) {
00223 for (int i=0; i<kNBranch; ++i) this->Load(i);
00224 return 1;
00225 }
00226
00227 // Check if branch is already loaded
00228 if (this->IsLoaded((BranchID_t) branchID)) return 0;
00229
00230 // Make sure that this branch exists before actually loading it
00231 if (fBranch[branchID]) {
00232 fBranch[branchID]->GetEntry(fIndex);
00233 this->SetLoaded(branchID);
00234 return 1;
00235 }
00236 else {
00237 // Do this in case event was written with split level 0, when
00238 // event is written to one branch
00239 std::cout << "IoEventHandle::Load() Warning: Branch " << branchID
00240 << " is missing. Loading entire event" << std::endl;
00241 fEventTree->GetEntry(fIndex);
00242 this->SetLoaded(kNBranch);
00243 }
00244
00245 return 0;
00246 }
|
|
|
Definition at line 159 of file EventDataModel/EventHandle.cxx. References Bucket(), and kMCID. 00159 { return this->Bucket(kMCID); }
|
|
|
Definition at line 169 of file EventDataModel/EventHandle.cxx. References Bucket(), and kMCID. Referenced by mcchk::NeutrinoAna::Ana(), fillntup::FillNtup::Ana(), clusterss::CompareClusters::Ana(), clusterss::ClusterCheck::Ana(), trk::CirceFit::Ana(), doNeuKin(), evd::DetectorView::DrawMCTruth(), evd::SimulationDrawer::GetMCTruth(), main(), sim::TruthFilter::Reco(), evgen::SingleGen::Reco(), novamc::NOVAMC::Reco(), evgen::GENIEGen::Reco(), and evgen::CosmicsGen::Reco(). 00169 {
00170 return this->Bucket(kMCID);
00171 }
|
|
|
Definition at line 162 of file EventDataModel/EventHandle.cxx. References Bucket(), and kRawID. 00162 { return this->Bucket(kRawID); }
|
|
|
Definition at line 178 of file EventDataModel/EventHandle.cxx. References Bucket(), and kRawID. Referenced by mcchk::DetAna::Ana(), mcchk::CosmicAna::Ana(), evd::Display3D::DrawRawData(), vali::Validator::GetPTInfo(), evd::RawDataDrawer::GetRawDigits(), vali::Validator::GetRawInfo(), main(), rsim::SimpleReadout::Reco(), and calhit::CalHit::Reco(). 00178 {
00179 return this->Bucket(kRawID);
00180 }
|
|
|
Definition at line 163 of file EventDataModel/EventHandle.cxx. References Bucket(), and kRawAuxID. 00163 { return this->Bucket(kRawAuxID); }
|
|
|
Definition at line 181 of file EventDataModel/EventHandle.cxx. References Bucket(), and kRawAuxID. Referenced by main(). 00181 {
00182 return this->Bucket(kRawAuxID);
00183 }
|
|
|
Definition at line 165 of file EventDataModel/EventHandle.cxx. References Bucket(), and kRecoID. 00165 { return this->Bucket(kRecoID); }
|
|
|
|
Mark a particular branch as loaded
Definition at line 92 of file EventDataModel/EventHandle.cxx. References fIsLoaded, and kNBranch. Referenced by Load(). 00093 {
00094 assert(branchId>=0 && branchId<=kNBranch);
00095 // Use kNBranch to mark that all branches are loaded
00096 if (branchId==kNBranch) {
00097 for (int i=0; i<kNBranch; ++i) fIsLoaded[i] = true;
00098 return;
00099 }
00100 // Use others to mark branches one-by-one
00101 fIsLoaded[branchId] = true;
00102 }
|
|
|
Definition at line 167 of file EventDataModel/EventHandle.cxx. References Bucket(), and kSummaryID. 00167 { return this->Bucket(kSummaryID);}
|
|
|
Definition at line 193 of file EventDataModel/EventHandle.cxx. References Bucket(), and kSummaryID. Referenced by main(). 00193 {
00194 return this->Bucket(kSummaryID);
00195 }
|
|
|
Definition at line 166 of file EventDataModel/EventHandle.cxx. References Bucket(), and kUserID. 00166 { return this->Bucket(kUserID); }
|
|
|
Definition at line 190 of file EventDataModel/EventHandle.cxx. References Bucket(), and kUserID. Referenced by main(). 00190 {
00191 return this->Bucket(kUserID);
00192 }
|
|
|
Definition at line 77 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
|
|
Definition at line 74 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
|
|
Definition at line 73 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
|
|
Definition at line 71 of file EventDataModel/EventHandle.h. |
|
|
Which parts of the event are loaded? Definition at line 69 of file EventDataModel/EventHandle.h. Referenced by ClearLoadFlags(), EventHandle(), IsLoaded(), and SetLoaded(). |
|
|
Definition at line 72 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
|
|
Definition at line 68 of file EventDataModel/EventHandle.h. Referenced by ClearLoadFlags(). |
|
|
Definition at line 75 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
|
|
Definition at line 76 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
|
|
Definition at line 78 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
|
|
Definition at line 80 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
|
|
Definition at line 79 of file EventDataModel/EventHandle.h. Referenced by ~EventHandle(). |
1.3.9.1