| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

MixInputSvc.h

Go to the documentation of this file.
00001 
00010 #ifndef MIXINPUTSVC_H
00011 #define MIXINPUTSVC_H
00012 
00013 #include "TRandom3.h"
00014 
00015 #include "Context/TimeStamp.h"
00016 #include "RootIOSvc/RootIOCnvSvc.h"
00017 #include "MixInputSvc/IMixInputSvc.h"
00018 
00019 #include "GaudiKernel/MsgStream.h"
00020 //#include "GaudiKernel/RndmGenerators.h"
00021 
00022 class  PerSimHeader;
00023 
00024 class  IService;
00025 class  IRootIOSvc;
00026 class  IRndmGenSvc;
00027 class  IConversionSvc;
00028 
00029 class MixInputSvc : public RootIOCnvSvc, virtual public IMixInputSvc
00030 {
00031  public:
00032    MixInputSvc(const string& name, ISvcLocator* svc);
00033    virtual ~MixInputSvc();
00034 
00035    virtual StatusCode initialize();
00036    virtual StatusCode queryInterface(const InterfaceID& riid, void** ppint);
00037    virtual void       setInputFiles(const vector<string>& inputs) 
00038                       { m_defaultInputFilenames = inputs;}
00039 
00040    virtual StatusCode prepareStream();
00041    virtual StatusCode getSimHeader(GenHeader*& gh, SimHeader*& sh);
00042  
00043  private:
00044    StatusCode         doInit();
00045    double             nextTime(double tau);
00046    double             flatdis(double maximum);  
00047 
00048    //Samples, Files, RootIOStreams
00049    map<string, vector<string> >                m_inputSamples;
00050    map<string, RootInputStream*>               m_simMap;
00051    map<string, RootInputStream*>               m_genMap;
00052    map<string, map<string, RootInputStream*> > m_sampleInputStreamMap;
00053 
00054    double             m_maximum;
00055 
00056    //Times
00057    double             m_maintau;
00058    double             m_lasttime;
00059    TimeStamp          m_lastTime;
00060 
00061    //The eight ones are for sampling
00062    //string:sample
00063    map<string, int>    m_fileNum;
00064    map<string, int>    m_fileindex;
00065    map<string, int>    m_fileEntryNum;
00066    map<string, int>    m_sfileentries;
00067    map<string, int>    m_gfileentries;
00068    map<string, int>    m_streamentries;
00069    map<string, double> m_nod;
00070    map<string, double> m_timeTau;
00071 
00072    mutable             MsgStream m_log;
00073    TRandom3            m_randomNum;
00074    //IRndmGenSvc*      m_ranSvc;  
00075    //Rndm::Numbers     m_exp;
00076    //Rndm::Numbers     m_uniSample;
00077    //Rndm::Numbers     m_uniFile;
00078 
00079    //The three ones are for conversion from PerSimHeader to SimHeader
00080    IService*           m_isvc;
00081    IRootIOSvc*         m_rioSvc;
00082    IConversionSvc*     m_convSvc;
00083 };
00084 
00085 #endif //MixInputSvc_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:44:38 2011 for MixInputSvc by doxygen 1.4.7