BOSS 7.0.8
BESIII Offline Software System
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DetVerSvcPack Namespace Reference

Classes

struct  InputRawInit
 
struct  InputRootInit
 
struct  SimulationInit
 

Functions

int funcInputRaw (ISvcLocator *svcLct)
 
int getRunFromFileList (const std::string &flist)
 
int funcInputRoot (ISvcLocator *svcLct)
 
int funcSimulation (ISvcLocator *svcLct)
 

Variables

int(* pf_helper )(ISvcLocator *)
 
InputRawInit init
 

Function Documentation

◆ funcInputRaw()

int DetVerSvcPack::funcInputRaw ( ISvcLocator *  svcLct)

Definition at line 7 of file JobInputRaw.cxx.

8 {
9 IRawDataInputSvc* iSvc = 0;
10 StatusCode sc = svcLct->service("RawDataInputSvc", iSvc, false);
11 if ( sc.isSuccess() ) {
12 RawDataInputSvc* svc = dynamic_cast<RawDataInputSvc*>(iSvc);
13 if ( svc != 0 ) {
14 return svc->runNo();
15 }
16 }
17 return -1;
18 }
uint32_t runNo()

Referenced by DetVerSvcPack::InputRawInit::InputRawInit().

◆ funcInputRoot()

int DetVerSvcPack::funcInputRoot ( ISvcLocator *  svcLct)

Definition at line 27 of file JobInputRoot.cxx.

28 {
29 SmartIF<IJobOptionsSvc> iSvc(svcLct->service("JobOptionsSvc"));
30 if ( iSvc.isValid() ) {
31 const std::vector<const Property*>* ps = iSvc->getProperties("EventCnvSvc");
32 std::vector<const Property*>::const_iterator it, end = ps->end();
33 for ( it = ps->begin(); it != end; ++it ) {
34 if ( (*it)->name() == "digiRootInputFile" ) {
35 return getRunFromFileList( (*it)->toString() );
36 }
37 }
38 }
39 return -1;
40 }
int getRunFromFileList(const std::string &flist)

Referenced by DetVerSvcPack::InputRootInit::InputRootInit().

◆ funcSimulation()

int DetVerSvcPack::funcSimulation ( ISvcLocator *  svcLct)

Definition at line 9 of file JobSimulation.cxx.

10 {
11 IRealizationSvc* iSvc = 0;
12 StatusCode sc = svcLct->service("RealizationSvc", iSvc, false);
13 if ( sc.isSuccess() ) {
14 RealizationSvc* svc = dynamic_cast<RealizationSvc*>(iSvc);
15 if ( svc != 0 ) {
16 return abs(svc->getRunId());
17 }
18 }
19 return -1;
20 }

Referenced by DetVerSvcPack::SimulationInit::SimulationInit().

◆ getRunFromFileList()

int DetVerSvcPack::getRunFromFileList ( const std::string &  flist)

Definition at line 11 of file JobInputRoot.cxx.

12 {
13 std::string::size_type p1 = flist.find('"') + 1;
14 std::string::size_type p2 = flist.find('"', p1);
15 std::string fn = flist.substr(p1, p2-p1);
16
17 TFile* file = TFile::Open(fn.c_str(), "READ");
18 TTree* tree = (TTree*)file->Get("Event");
19 tree->SetMakeClass(1);
20 int run;
21 tree->SetBranchAddress("m_runId", &run);
22 tree->GetEntry(0);
23
24 return abs(run);
25 }
char * file
Definition: DQA_TO_DB.cxx:15

Referenced by funcInputRoot().

Variable Documentation

◆ init

SimulationInit DetVerSvcPack::init

Definition at line 29 of file JobInputRaw.cxx.

◆ pf_helper

int(* DetVerSvcPack::pf_helper)(ISvcLocator *) ( ISvcLocator *  )