Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TPCdEdx.cxx

Go to the documentation of this file.
00001 #include "JobControl/test/TPCdEdx.h"
00002 // System
00003 #include <iostream>
00004 // ROOT
00005 #include "TRandom.h"
00006 // MIPP
00007 #include "Config/Param.h"
00008 #include "Config/Config.h"
00009 #include "JobControl/ModuleFactory.h"
00010 
00011 MODULE_DECL(TPCdEdx);
00012 
00013 static TRandom gsRand(12);
00014 
00015 //......................................................................
00016 
00017 TPCdEdx::TPCdEdx(const char* v) : jobc::Module("TPCdEdx")
00018 {
00019   std::cerr << "TPCdEdx::TPCdEdx()" << std::endl;
00020   this->SetCfgVersion(v);
00021 }
00022 
00023 //......................................................................
00024 
00025 TPCdEdx::~TPCdEdx() 
00026 {
00027   std::cerr << "TPCdEdx::~TPCdEdx()" << std::endl;
00028 }
00029 
00030 //......................................................................
00031 
00032 jobc::Result TPCdEdx::Reco(edm::EventHandle& /*evt*/) 
00033 {
00034   double r;
00035   r = gsRand.Uniform();
00036   if (fRlow<=r && fRhigh>r) {
00037     std::cerr << "TPCdEdx: Reco Passed (" 
00038               << fRlow << "," << r << "," << fRhigh << ")" << std::endl;
00039     return jobc::kPassed;
00040   }
00041   std::cerr << "TPCdEdx: Reco Failed (" 
00042             << fRlow << "," << r << "," << fRhigh << ")" << std::endl;
00043   return jobc::kFailed;
00044 }
00045 
00046 //......................................................................
00047 
00048 jobc::Result TPCdEdx::Ana(const edm::EventHandle& /*evt*/) 
00049 {
00050   double r;
00051   r = gsRand.Uniform();
00052   if (fRlow<=r && fRhigh>r) {
00053     std::cerr << "TPCdEdx: Ana Passed (" 
00054               << fRlow << "," << r << "," << fRhigh << ")" << std::endl;
00055     return jobc::kPassed;
00056   }
00057   std::cerr << "TPCdEdx: Ana Failed (" 
00058             << fRlow << "," << r << "," << fRhigh << ")" << std::endl;
00059   return jobc::kFailed;
00060 }
00061 
00062 //......................................................................
00063 
00064 void TPCdEdx::NewFile(const char* filename) 
00065 {
00066   std::cerr << 
00067     "TPCdEdx: NewFile(" << filename << ")" << std::endl;
00068 }
00069 
00070 //......................................................................
00071 
00072 void TPCdEdx::EndFile(const char* filename) {
00073   std::cerr << 
00074     "TPCdEdx: EndFile(" << filename << ")" << std::endl;
00075 }
00076 
00077 //......................................................................
00078 
00079 void TPCdEdx::NewRun(int run, int subrun) {
00080   std::cerr << 
00081     "TPCdEdx: NewRun(" << run << "," << subrun << ")" << std::endl;
00082 }
00083 
00084 //......................................................................
00085 
00086 void TPCdEdx::EndRun(int run, int subrun) {
00087   std::cerr << 
00088     "TPCdEdx: EndRun(" << run << "," << subrun << ")" << std::endl;
00089 }
00090 
00091 //......................................................................
00092 
00093 void TPCdEdx::NewSubrun(int run, int subrun) 
00094 {
00095   std::cerr << 
00096     "TPCdEdx: NewSubrun(" << run << "," << subrun << ")" << std::endl;
00097 }
00098 
00099 //......................................................................
00100 
00101 void TPCdEdx::EndSubrun(int run, int subrun) {
00102   std::cerr << 
00103     "TPCdEdx: EndSubrun(" << run << "," << subrun << ")" << std::endl;
00104 }
00105 
00106 //......................................................................
00107 
00108 void TPCdEdx::Update(const cfg::Config& c) 
00109 {
00110   std::cerr << "TPCdEdx: Config" << std::endl;
00111 
00112   c("Rlow"). Get( fRlow  );
00113   c("Rhigh").Get( fRhigh );
00114 }
00115 

Generated on Sat Oct 11 02:35:28 2008 for NOvA Offline by  doxygen 1.3.9.1