GSI Object Oriented Online Offline (Go4)
GO4-6.3.0
Go4ExampleMesh
TMeshB2AnlProc.cxx
Go to the documentation of this file.
1
// $Id$
2
//-----------------------------------------------------------------------
3
// The GSI Online Offline Object Oriented (Go4) Project
4
// Experiment Data Processing at EE department, GSI
5
//-----------------------------------------------------------------------
6
// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7
// Planckstr. 1, 64291 Darmstadt, Germany
8
// Contact: http://go4.gsi.de
9
//-----------------------------------------------------------------------
10
// This software can be used under the license agreements as stated
11
// in Go4License.txt file which is part of the distribution.
12
//-----------------------------------------------------------------------
13
14
#include "
TMeshB2AnlProc.h
"
15
16
#include "
TGo4Log.h
"
17
#include "
TGo4UserException.h
"
18
19
#include "
TMeshRawEvent.h
"
20
#include "
TMeshB2OutputEvent.h
"
21
#include "
TMeshB2InputEvent.h
"
22
23
//***********************************************************
24
// this one is used in TXXXAnlFact
25
TMeshB2AnlProc::TMeshB2AnlProc
(
const
char
*name)
26
:
TGo4EventProcessor
(name),fxInput(nullptr)
27
{
28
TGo4Log::Info
(
"TMeshB2AnlProc: Create %s"
, name);
29
}
30
//***********************************************************
31
TMeshB2AnlProc::TMeshB2AnlProc
()
32
:
TGo4EventProcessor
(
"Processor2"
),
fxInput
(nullptr)
33
{
34
}
35
//***********************************************************
36
TMeshB2AnlProc::~TMeshB2AnlProc
()
37
{
38
}
39
40
void
TMeshB2AnlProc::Analysis
(
TMeshB2OutputEvent
* poutevt)
41
{
42
if
(!
fxInput
) {
43
// lazy init for input event from framework
44
TGo4EventElement
*providerinput =
GetInputEvent
(
"Input2Provider"
);
45
TMeshRawEvent
*raw =
dynamic_cast<
TMeshRawEvent
*
>
(providerinput);
46
if
(raw)
47
fxInput
= &(raw->
fxSub2
);
48
// provider delivers full raw event, we use only our component
49
else
50
fxInput
=
dynamic_cast<
TMeshB2InputEvent
*
>
(providerinput);
51
// provider with partial io delivers just our component
52
}
53
if
(
fxInput
) {
54
// do the processing here:
55
for
(Int_t i = 0; i < 4; i++) {
56
poutevt->
frData
[i] = (Float_t)
fxInput
->
fiCrate2
[i];
57
}
58
59
}
else
{
60
throw
TGo4UserException
(3,
"Error: no input event for processor %s"
, GetName());
61
}
62
}
TGo4UserException
Definition:
TGo4UserException.h:42
TMeshB2OutputEvent
Definition:
TMeshB2OutputEvent.h:22
TMeshB2AnlProc::~TMeshB2AnlProc
virtual ~TMeshB2AnlProc()
Definition:
TMeshB2AnlProc.cxx:36
TGo4Log::Info
static void Info(const char *text,...) GO4_PRINTF_ARGS
Definition:
TGo4Log.cxx:294
TMeshB2InputEvent::fiCrate2
Int_t fiCrate2[16]
Definition:
TMeshB2InputEvent.h:32
TMeshB2InputEvent.h
TGo4Log.h
TGo4EventElement
Definition:
TGo4EventElement.h:36
TMeshB2OutputEvent.h
TMeshRawEvent::fxSub2
TMeshB2InputEvent fxSub2
Definition:
TMeshRawEvent.h:48
TMeshB2AnlProc.h
TMeshB2AnlProc::TMeshB2AnlProc
TMeshB2AnlProc()
Definition:
TMeshB2AnlProc.cxx:31
TMeshB2AnlProc::Analysis
void Analysis(TMeshB2OutputEvent *target)
Definition:
TMeshB2AnlProc.cxx:40
TMeshB2AnlProc::fxInput
TMeshB2InputEvent * fxInput
Definition:
TMeshB2AnlProc.h:30
TGo4EventProcessor::GetInputEvent
TGo4EventElement * GetInputEvent()
Definition:
TGo4EventProcessor.h:86
TGo4UserException.h
TMeshRawEvent.h
TMeshRawEvent
Definition:
TMeshRawEvent.h:26
TGo4EventProcessor
Definition:
TGo4EventProcessor.h:67
TMeshB2OutputEvent::frData
Float_t frData[16]
Definition:
TMeshB2OutputEvent.h:31
TMeshB2InputEvent
Definition:
TMeshB2InputEvent.h:22
Generated on Wed Jan 10 2024 15:04:17 for GSI Object Oriented Online Offline (Go4) by
1.8.13