BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
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 6 of file JobInputRaw.cxx.

6 {
7 IRawDataInputSvc* svc = 0;
8 StatusCode sc = svcLct->service( "RawDataInputSvc", svc, false );
9 if ( sc.isSuccess() )
10 {
11 if ( svc != 0 ) { return svc->runNo(); }
12 }
13 return -1;
14 }
virtual uint32_t runNo()=0

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

◆ funcInputRoot()

int DetVerSvcPack::funcInputRoot ( ISvcLocator * svcLct)

Definition at line 26 of file JobInputRoot.cxx.

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

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

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

◆ getRunFromFileList()

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

Definition at line 11 of file JobInputRoot.cxx.

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

Referenced by funcInputRoot().

Variable Documentation

◆ init

SimulationInit DetVerSvcPack::init

Definition at line 23 of file JobInputRaw.cxx.

◆ pf_helper

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