/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
CalibWriter Class Reference

#include <CalibWriter.h>

Inheritance diagram for CalibWriter:
Inheritance graph
[legend]
Collaboration diagram for CalibWriter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CalibWriter ()
virtual ~CalibWriter ()
virtual void setSubsite (int subSite)
virtual void setIsSim (bool isSim)

Protected Member Functions

int mainProcess ()

Protected Attributes

int runNumber
int timeWindow
string inputFileName
ContextRange range
Int_t aggNo
Dbi::SubSite subsite
Dbi::Task task
TimeStamp startTime
TimeStamp endTime
bool isSim
int siteMask

Private Member Functions

virtual int setContextRange ()
virtual int init ()
virtual int fillRow ()
virtual int final ()

Private Attributes

RunInfoQuaryrunInfo

Detailed Description

Definition at line 11 of file CalibWriter.h.


Constructor & Destructor Documentation

CalibWriter::CalibWriter ( )

Definition at line 11 of file CalibWriter.cc.

{
   runInfo = new RunInfoQuary();
   aggNo = -1;
   subsite = 0;
   task = 0;
}
CalibWriter::~CalibWriter ( ) [virtual]

Definition at line 19 of file CalibWriter.cc.

{
   delete runInfo;
}

Member Function Documentation

void CalibWriter::setSubsite ( int  subSite) [virtual]

Reimplemented in CalibFeeWriter, and CalibPmtWriter.

Definition at line 72 of file CalibWriter.cc.

{
    this->subsite = subSite;
}
void CalibWriter::setIsSim ( bool  isSim) [virtual]

Reimplemented in CalibFeeWriter, and CalibPmtWriter.

Definition at line 77 of file CalibWriter.cc.

{
    this->isSim = isSim;
}
int CalibWriter::setContextRange ( ) [private, virtual]

Reimplemented in FeeCableMapWriter.

Definition at line 41 of file CalibWriter.cc.

{ 
   ContextRange Cr;
   if( 0 == runInfo->runNo2ContextRange(runNumber , Cr) )
   {
      cout<<"can not get run info"<<endl;
       return 0;
    }
    cout<<"new writer"<<endl;
    startTime = Cr.GetTimeStart();
    //endTime = Cr.GetTimeEnd();
cout<<runNumber<<"-------------------------------------------------------------------------"<<endl;
    //TimeStamp T(2020,12,31,0,0,0,0,0,0);
    endTime = TimeStamp::GetEOT();
  //  endTime.Add(timeWindow);
 
    cout<<"start time = "<<startTime<<"  ";
    cout<<"end time = "<<endTime<<endl;
    int simMask;
    if(isSim){
       simMask = 2;
    }else{
       simMask = Cr.GetSimMask();
    }
    
    //ContextRange Cr2(Cr.GetSiteMask(), simMask, startTime, endTime);
    ContextRange Cr2(siteMask, simMask, startTime, endTime);
    range = Cr2;
    return 1;
}
virtual int CalibWriter::init ( ) [inline, private, virtual]

Reimplemented in CalibFeeWriter, CalibPmtWriter, FeeCableMapWriter, and SimPmtWriter.

Definition at line 25 of file CalibWriter.h.

{ return 0; }
virtual int CalibWriter::fillRow ( ) [inline, private, virtual]

Reimplemented in CalibFeeWriter, CalibPmtWriter, FeeCableMapWriter, and SimPmtWriter.

Definition at line 26 of file CalibWriter.h.

{ return 0; }
virtual int CalibWriter::final ( ) [inline, private, virtual]

Reimplemented in CalibFeeWriter, CalibPmtWriter, FeeCableMapWriter, and SimPmtWriter.

Definition at line 27 of file CalibWriter.h.

{ return 0; }
int CalibWriter::mainProcess ( ) [protected]

Definition at line 88 of file CalibWriter.cc.

{ 
   cout<<"CalibWriter runing--------------"<<endl;
   if( 0 == setContextRange() ) 
   {
     cout<<"can not set ContextRange"<<endl;
     return 0;
   }
   if( 0 == init() ) 
   {
     cout<<"can not initial"<<endl;
      return 0;
   }
   if( 0 == fillRow() )
   {
     cout<<"can not fill row"<<endl;
    return 0;
   }
   if( 0 == final() )
   {
     cout<<"can not finalize"<<endl;
     return 0;
   }
   return 1;

}

Member Data Documentation

Definition at line 29 of file CalibWriter.h.

int CalibWriter::runNumber [protected]

Definition at line 32 of file CalibWriter.h.

int CalibWriter::timeWindow [protected]

Definition at line 33 of file CalibWriter.h.

string CalibWriter::inputFileName [protected]

Definition at line 34 of file CalibWriter.h.

Definition at line 35 of file CalibWriter.h.

Int_t CalibWriter::aggNo [protected]

Definition at line 36 of file CalibWriter.h.

Definition at line 37 of file CalibWriter.h.

Definition at line 38 of file CalibWriter.h.

Definition at line 39 of file CalibWriter.h.

Definition at line 40 of file CalibWriter.h.

bool CalibWriter::isSim [protected]

Definition at line 41 of file CalibWriter.h.

int CalibWriter::siteMask [protected]

Definition at line 42 of file CalibWriter.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:02:34 for DBWriter by doxygen 1.7.4