ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/ObjectService/src/ObjectService.cc
Revision: 1.2
Committed: Wed Jul 30 11:24:43 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre1, Mit_006b, Mit_006a, Mit_006, Mit_005, Mit_004, MITHEP_2_0_x
Changes since 1.1: +11 -119 lines
Log Message:
Added ObjectService.

File Contents

# Content
1 // $Id: ObjectService.cc,v 1.1 2008/07/30 09:04:40 loizides Exp $
2
3 #include "MitProd/ObjectService/interface/ObjectService.h"
4 #include "DataFormats/Provenance/interface/ModuleDescription.h"
5 #include "FWCore/ParameterSet/interface/ParameterSet.h"
6 #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
7 #include "FWCore/ServiceRegistry/interface/Service.h"
8 #include "FWCore/MessageLogger/interface/JobReport.h"
9 #include "MitProd/ObjectService/interface/NamedObject.h"
10
11 using namespace edm;
12 using namespace std;
13 using namespace mithep;
14
15 //--------------------------------------------------------------------------------------------------
16 ObjectService::ObjectService(const ParameterSet &cfg, ActivityRegistry &ar) :
17 obs_(0),
18 obsEvt_(0)
19 {
20 // Constructor.
21
22 obs_.SetOwner(kTRUE);
23 obsEvt_.SetOwner(kTRUE);
24
25 // set watchers
26 ar.watchPreProcessEvent (this,&ObjectService::preEventProcessing);
27 ar.watchPostProcessEvent(this,&ObjectService::postEventProcessing);
28 ar.watchPostBeginJob (this,&ObjectService::postBeginJob);
29 ar.watchPostEndJob (this,&ObjectService::postEndJob);
30 }
31
32 //--------------------------------------------------------------------------------------------------
33 ObjectService::~ObjectService()
34 {
35 // Destructor.
36 }
37
38 //--------------------------------------------------------------------------------------------------
39 void ObjectService::postBeginJob()
40 {
41 // Nothing to be done for now
42 }
43
44 //--------------------------------------------------------------------------------------------------
45 void ObjectService::postEndJob()
46 {
47 // Clear all objects in the hashtables.
48
49 obs_.Delete();
50 obsEvt_.Delete();
51 }
52
53 //--------------------------------------------------------------------------------------------------
54 void ObjectService::postEventProcessing(const Event&, const EventSetup&)
55 {
56 // Remove objects put per event.
57
58 obsEvt_.Clear();
59 }
60
61 //--------------------------------------------------------------------------------------------------
62 void ObjectService::preEventProcessing(const EventID&, const Timestamp&)
63 {
64 }