CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
APVCyclePhaseMonitor Class Reference

#include <DPGAnalysis/SiStripTools/plugins/APVCyclePhaseMonitor.cc>

Inheritance diagram for APVCyclePhaseMonitor:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 APVCyclePhaseMonitor (const edm::ParameterSet &)
 
 ~APVCyclePhaseMonitor () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void endJob () override
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 

Private Attributes

edm::EDGetTokenT< APVCyclePhaseCollection_apvphasecollectionToken
 
std::map< std::string, TH1F * > _hphases
 
std::map< std::string, TProfile * > _hphasevsorbit
 
std::map< std::string, TH1F ** > _hselectedphases
 
std::map< std::string, TH1F ** > _hselectedphasessize
 
std::map< std::string, TH1F ** > _hselectedphasesvector
 
std::map< std::string, TProfile ** > _hselectedphasevectorvsorbit
 
std::map< std::string, TProfile ** > _hselectedphasevsorbit
 
unsigned int _nevents
 
std::vector< std::string > _selectedparts
 
std::vector< std::string > _selectedvectorparts
 
const unsigned int m_LSfrac
 
const unsigned int m_maxLS
 
RunHistogramManager m_rhm
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 50 of file APVCyclePhaseMonitor.cc.

Constructor & Destructor Documentation

◆ APVCyclePhaseMonitor()

APVCyclePhaseMonitor::APVCyclePhaseMonitor ( const edm::ParameterSet iConfig)
explicit

Definition at line 91 of file APVCyclePhaseMonitor.cc.

References _hselectedphases, _hselectedphasessize, _hselectedphasesvector, _hselectedphasevectorvsorbit, _hselectedphasevsorbit, _selectedparts, _selectedvectorparts, edm::ParameterSet::getParameter(), TFileService::kSharedResource, m_LSfrac, m_maxLS, m_rhm, RunHistogramManager::makeTH1F(), and RunHistogramManager::makeTProfile().

93  consumes<APVCyclePhaseCollection>(iConfig.getParameter<edm::InputTag>("apvCyclePhaseCollection"))),
95  iConfig.getUntrackedParameter<std::vector<std::string> >("selectedPartitions", std::vector<std::string>())),
96  _selectedvectorparts(iConfig.getUntrackedParameter<std::vector<std::string> >("selectedVectorPartitions",
97  std::vector<std::string>())),
98  m_maxLS(iConfig.getUntrackedParameter<unsigned int>("maxLSBeforeRebin", 125)),
99  m_LSfrac(iConfig.getUntrackedParameter<unsigned int>("startingLSFraction", 16)),
101  _hphases(),
105  _hphasevsorbit(),
108  _nevents(0) {
109  //now do what ever initialization is needed
110 
111  usesResource(TFileService::kSharedResource);
112 
113  edm::LogInfo("UsedAPVCyclePhaseCollection")
114  << " APVCyclePhaseCollection " << iConfig.getParameter<edm::InputTag>("apvCyclePhaseCollection") << " used";
115 
116  for (std::vector<std::string>::const_iterator part = _selectedparts.begin(); part != _selectedparts.end(); ++part) {
117  char hname[300];
118 
119  sprintf(hname, "selected_phase_%s", part->c_str());
120  edm::LogInfo("SelectedTH1FBeingBooked") << "TH1F " << hname << " being booked";
121  _hselectedphases[*part] = m_rhm.makeTH1F(hname, hname, 70, -0.5, 69.5);
122 
123  sprintf(hname, "selected_phasevsorbit_%s", part->c_str());
124  edm::LogInfo("SelectedTProfileBeingBooked") << "TProfile " << hname << " being booked";
125  _hselectedphasevsorbit[*part] = m_rhm.makeTProfile(hname, hname, m_LSfrac * m_maxLS, 0, m_maxLS * 262144);
126  }
127 
128  for (std::vector<std::string>::const_iterator part = _selectedvectorparts.begin(); part != _selectedvectorparts.end();
129  ++part) {
130  char hname[300];
131 
132  sprintf(hname, "selected_phase_vector_%s", part->c_str());
133  edm::LogInfo("SelectedVectTH1FBeingBooked") << "TH1F " << hname << " being booked";
134  _hselectedphasesvector[*part] = m_rhm.makeTH1F(hname, hname, 70, -0.5, 69.5);
135 
136  sprintf(hname, "selected_phase_size_%s", part->c_str());
137  edm::LogInfo("SelectedVectSizeTH1FBeingBooked") << "TH1F " << hname << " being booked";
138  _hselectedphasessize[*part] = m_rhm.makeTH1F(hname, hname, 10, -0.5, 9.5);
139 
140  sprintf(hname, "selected_phasevectorvsorbit_%s", part->c_str());
141  edm::LogInfo("SelectedVectTProfileBeingBooked") << "TProfile " << hname << " being booked";
142  _hselectedphasevectorvsorbit[*part] = m_rhm.makeTProfile(hname, hname, m_LSfrac * m_maxLS, 0, m_maxLS * 262144);
143  }
144 }
std::map< std::string, TH1F ** > _hselectedphasesvector
static const std::string kSharedResource
Definition: TFileService.h:76
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< std::string > _selectedparts
edm::EDGetTokenT< APVCyclePhaseCollection > _apvphasecollectionToken
std::map< std::string, TProfile ** > _hselectedphasevsorbit
T getUntrackedParameter(std::string const &, T const &) const
std::map< std::string, TH1F * > _hphases
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
std::map< std::string, TProfile ** > _hselectedphasevectorvsorbit
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::map< std::string, TH1F ** > _hselectedphases
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
std::map< std::string, TH1F ** > _hselectedphasessize
const unsigned int m_maxLS
std::vector< std::string > _selectedvectorparts
Log< level::Info, false > LogInfo
part
Definition: HCALResponse.h:20
std::map< std::string, TProfile * > _hphasevsorbit
RunHistogramManager m_rhm
const unsigned int m_LSfrac

◆ ~APVCyclePhaseMonitor()

APVCyclePhaseMonitor::~APVCyclePhaseMonitor ( )
override

Definition at line 146 of file APVCyclePhaseMonitor.cc.

146  {
147  // do anything here that needs to be done at desctruction time
148  // (e.g. close files, deallocate resources etc.)
149 }

Member Function Documentation

◆ analyze()

void APVCyclePhaseMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 156 of file APVCyclePhaseMonitor.cc.

References _apvphasecollectionToken, _hphases, _hphasevsorbit, _hselectedphases, _hselectedphasessize, _hselectedphasesvector, _hselectedphasevectorvsorbit, _hselectedphasevsorbit, _nevents, _selectedparts, _selectedvectorparts, BTVHLTOfflineSource_cfi::dirname, HcalObjRepresent::Fill(), APVCyclePhaseCollection::get(), APVCyclePhaseCollection::getPhase(), APVCyclePhaseCollection::getPhases(), iEvent, m_LSfrac, m_maxLS, TFileService::mkdir(), and configurableapvcyclephaseproducer_CRAFT08_cfi::phases.

156  {
157  using namespace edm;
158 
159  _nevents++;
160 
162  iEvent.getByToken(_apvphasecollectionToken, apvphases);
163 
164  // improve the matchin between default and actual partitions
165 
167 
168  for (std::map<std::string, int>::const_iterator phase = apvphases->get().begin(); phase != apvphases->get().end();
169  ++phase) {
170  if (_hphases.find(phase->first) == _hphases.end()) {
171  char dirname[300];
172  sprintf(dirname, "run_%d", iEvent.run());
173  TFileDirectory subrun = tfserv->mkdir(dirname);
174 
175  char hname[300];
176 
177  sprintf(hname, "phase_%s", phase->first.c_str());
178  edm::LogInfo("TH1FBeingBooked") << "TH1F " << hname << " being booked";
179  _hphases[phase->first] = subrun.make<TH1F>(hname, hname, 70, -0.5, 69.5);
180  _hphases[phase->first]->GetXaxis()->SetTitle("BX mod 70");
181  _hphases[phase->first]->GetYaxis()->SetTitle("Events");
182 
183  sprintf(hname, "phasevsorbit_%s", phase->first.c_str());
184  edm::LogInfo("TProfileBeingBooked") << "TProfile " << hname << " being booked";
185  _hphasevsorbit[phase->first] = subrun.make<TProfile>(hname, hname, m_LSfrac * m_maxLS, 0, m_maxLS * 262144);
186  _hphasevsorbit[phase->first]->SetCanExtend(TH1::kXaxis);
187  _hphasevsorbit[phase->first]->GetXaxis()->SetTitle("time [orbit#]");
188  _hphasevsorbit[phase->first]->GetYaxis()->SetTitle("Phase");
189  }
190  _hphases[phase->first]->Fill(phase->second);
191  _hphasevsorbit[phase->first]->Fill(iEvent.orbitNumber(), phase->second);
192  }
193 
194  // selected partitions
195 
196  for (std::vector<std::string>::const_iterator part = _selectedparts.begin(); part != _selectedparts.end(); ++part) {
198  (*_hselectedphases[*part])->Fill(apvphases->getPhase(*part));
199  }
202  (*_hselectedphasevsorbit[*part])->Fill(iEvent.orbitNumber(), apvphases->getPhase(*part));
203  }
204  }
205 
206  for (std::vector<std::string>::const_iterator part = _selectedvectorparts.begin(); part != _selectedvectorparts.end();
207  ++part) {
208  const std::vector<int> phases = apvphases->getPhases(*part);
209 
212  (*_hselectedphasessize[*part])->Fill(phases.size());
213  }
214 
215  for (std::vector<int>::const_iterator phase = phases.begin(); phase != phases.end(); ++phase) {
219  }
222  (*_hselectedphasevectorvsorbit[*part])->Fill(iEvent.orbitNumber(), *phase);
223  }
224  }
225  }
226 }
std::map< std::string, TH1F ** > _hselectedphasesvector
std::vector< std::string > _selectedparts
edm::EDGetTokenT< APVCyclePhaseCollection > _apvphasecollectionToken
std::map< std::string, TProfile ** > _hselectedphasevsorbit
const std::map< std::string, int > & get() const
std::map< std::string, TH1F * > _hphases
int iEvent
Definition: GenABIO.cc:224
std::map< std::string, TProfile ** > _hselectedphasevectorvsorbit
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::map< std::string, TH1F ** > _hselectedphases
const std::vector< int > getPhases(const std::string partition) const
std::map< std::string, TH1F ** > _hselectedphasessize
const unsigned int m_maxLS
std::vector< std::string > _selectedvectorparts
Log< level::Info, false > LogInfo
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
part
Definition: HCALResponse.h:20
const int getPhase(const std::string partition) const
HLT enums.
std::map< std::string, TProfile * > _hphasevsorbit
const unsigned int m_LSfrac

◆ beginJob()

void APVCyclePhaseMonitor::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 280 of file APVCyclePhaseMonitor.cc.

280 {}

◆ beginRun()

void APVCyclePhaseMonitor::beginRun ( const edm::Run iRun,
const edm::EventSetup  
)
overrideprivate

Definition at line 228 of file APVCyclePhaseMonitor.cc.

References _hphases, _hphasevsorbit, _hselectedphases, _hselectedphasessize, _hselectedphasesvector, _hselectedphasevectorvsorbit, _hselectedphasevsorbit, RunHistogramManager::beginRun(), compareTotals::hist, and m_rhm.

228  {
229  _hphases.clear();
230  _hphasevsorbit.clear();
231 
232  m_rhm.beginRun(iRun);
233 
234  for (std::map<std::string, TH1F**>::const_iterator hist = _hselectedphases.begin(); hist != _hselectedphases.end();
235  ++hist) {
236  if (*(hist->second)) {
237  (*(hist->second))->GetXaxis()->SetTitle("BX mod 70");
238  (*(hist->second))->GetYaxis()->SetTitle("Events");
239  }
240  }
241  for (std::map<std::string, TProfile**>::const_iterator prof = _hselectedphasevsorbit.begin();
242  prof != _hselectedphasevsorbit.end();
243  ++prof) {
244  if (*(prof->second)) {
245  (*(prof->second))->SetCanExtend(TH1::kXaxis);
246  (*(prof->second))->GetXaxis()->SetTitle("time [orbit#]");
247  (*(prof->second))->GetYaxis()->SetTitle("Phase");
248  }
249  }
250  for (std::map<std::string, TH1F**>::const_iterator hist = _hselectedphasesvector.begin();
251  hist != _hselectedphasesvector.end();
252  ++hist) {
253  if (*(hist->second)) {
254  (*(hist->second))->GetXaxis()->SetTitle("BX mod 70");
255  (*(hist->second))->GetYaxis()->SetTitle("Events");
256  }
257  }
258  for (std::map<std::string, TH1F**>::const_iterator hist = _hselectedphasessize.begin();
259  hist != _hselectedphasessize.end();
260  ++hist) {
261  if (*(hist->second)) {
262  (*(hist->second))->GetXaxis()->SetTitle("Number of Phases");
263  (*(hist->second))->GetYaxis()->SetTitle("Events");
264  }
265  }
266  for (std::map<std::string, TProfile**>::const_iterator prof = _hselectedphasevectorvsorbit.begin();
267  prof != _hselectedphasevectorvsorbit.end();
268  ++prof) {
269  if (*(prof->second)) {
270  (*(prof->second))->SetCanExtend(TH1::kXaxis);
271  (*(prof->second))->GetXaxis()->SetTitle("time [orbit#]");
272  (*(prof->second))->GetYaxis()->SetTitle("Phase");
273  }
274  }
275 }
std::map< std::string, TH1F ** > _hselectedphasesvector
std::map< std::string, TProfile ** > _hselectedphasevsorbit
std::map< std::string, TH1F * > _hphases
std::map< std::string, TProfile ** > _hselectedphasevectorvsorbit
std::map< std::string, TH1F ** > _hselectedphases
std::map< std::string, TH1F ** > _hselectedphasessize
void beginRun(const edm::Run &iRun)
std::map< std::string, TProfile * > _hphasevsorbit
RunHistogramManager m_rhm

◆ endJob()

void APVCyclePhaseMonitor::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 283 of file APVCyclePhaseMonitor.cc.

References _nevents.

283 { edm::LogInfo("EndOfJob") << _nevents << " analyzed events"; }
Log< level::Info, false > LogInfo

◆ endRun()

void APVCyclePhaseMonitor::endRun ( const edm::Run iRun,
const edm::EventSetup  
)
overrideprivate

Definition at line 277 of file APVCyclePhaseMonitor.cc.

277 {}

Member Data Documentation

◆ _apvphasecollectionToken

edm::EDGetTokenT<APVCyclePhaseCollection> APVCyclePhaseMonitor::_apvphasecollectionToken
private

Definition at line 64 of file APVCyclePhaseMonitor.cc.

Referenced by analyze().

◆ _hphases

std::map<std::string, TH1F*> APVCyclePhaseMonitor::_hphases
private

Definition at line 70 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), and beginRun().

◆ _hphasevsorbit

std::map<std::string, TProfile*> APVCyclePhaseMonitor::_hphasevsorbit
private

Definition at line 74 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), and beginRun().

◆ _hselectedphases

std::map<std::string, TH1F**> APVCyclePhaseMonitor::_hselectedphases
private

Definition at line 71 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), APVCyclePhaseMonitor(), and beginRun().

◆ _hselectedphasessize

std::map<std::string, TH1F**> APVCyclePhaseMonitor::_hselectedphasessize
private

Definition at line 73 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), APVCyclePhaseMonitor(), and beginRun().

◆ _hselectedphasesvector

std::map<std::string, TH1F**> APVCyclePhaseMonitor::_hselectedphasesvector
private

Definition at line 72 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), APVCyclePhaseMonitor(), and beginRun().

◆ _hselectedphasevectorvsorbit

std::map<std::string, TProfile**> APVCyclePhaseMonitor::_hselectedphasevectorvsorbit
private

Definition at line 76 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), APVCyclePhaseMonitor(), and beginRun().

◆ _hselectedphasevsorbit

std::map<std::string, TProfile**> APVCyclePhaseMonitor::_hselectedphasevsorbit
private

Definition at line 75 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), APVCyclePhaseMonitor(), and beginRun().

◆ _nevents

unsigned int APVCyclePhaseMonitor::_nevents
private

Definition at line 77 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), and endJob().

◆ _selectedparts

std::vector<std::string> APVCyclePhaseMonitor::_selectedparts
private

Definition at line 65 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), and APVCyclePhaseMonitor().

◆ _selectedvectorparts

std::vector<std::string> APVCyclePhaseMonitor::_selectedvectorparts
private

Definition at line 66 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), and APVCyclePhaseMonitor().

◆ m_LSfrac

const unsigned int APVCyclePhaseMonitor::m_LSfrac
private

Definition at line 68 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), and APVCyclePhaseMonitor().

◆ m_maxLS

const unsigned int APVCyclePhaseMonitor::m_maxLS
private

Definition at line 67 of file APVCyclePhaseMonitor.cc.

Referenced by analyze(), and APVCyclePhaseMonitor().

◆ m_rhm

RunHistogramManager APVCyclePhaseMonitor::m_rhm
private

Definition at line 69 of file APVCyclePhaseMonitor.cc.

Referenced by APVCyclePhaseMonitor(), and beginRun().