1 /**************************************************************************
2 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //-------------------------------------------------------------------------
19 // Event IO handler base class
20 // Author: Andreas Morsch, CERN
21 //-------------------------------------------------------------------------
23 #include "AliVEventHandler.h"
25 ClassImp(AliVEventHandler)
27 //______________________________________________________________________________
28 AliVEventHandler::AliVEventHandler() :
31 // default constructor
34 //______________________________________________________________________________
35 AliVEventHandler::~AliVEventHandler()
40 //______________________________________________________________________________
41 AliVEventHandler::AliVEventHandler(const char* name, const char* title):
45 //______________________________________________________________________________
46 void AliVEventHandler::Lock()
48 // Security lock. This is to detect NORMAL user errors and not really to
49 // protect against intentional hacks.
50 if (IsLocked()) return;
51 TObject::SetBit(kHandlerLocked, kTRUE);
54 //______________________________________________________________________________
55 void AliVEventHandler::UnLock()
57 // Verbose unlocking. Hackers will be punished ;-) ...
58 if (!IsLocked()) return;
59 TObject::SetBit(kHandlerLocked, kFALSE);
62 //______________________________________________________________________________
63 void AliVEventHandler::Changed()
65 // All critical setters pass through the Changed method that throws an exception
66 // in case the lock was set.
67 if (IsLocked()) Fatal("Changed","Critical setter of a handler called in locked mode");