Logo ROOT   6.14/05
Reference Guide
MPCode.h
Go to the documentation of this file.
1 /* @(#)root/multiproc:$Id$ */
2 // Author: Enrico Guiraud July 2015
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_MPCode
13 #define ROOT_MPCode
14 
15 /////////////////////////////////////////////////////////////////////////
16 /// This namespace prevents conflicts between MPCode::kError and
17 /// ELogLevel::kError
18 namespace MPCode {
19 
20  //////////////////////////////////////////////////////////////////////////
21  ///
22  /// An enumeration of the message codes handled by TProcessExecutor,
23  /// TTreeProcessorMP, TMPWorker, TMPWorkerTree and by the low level
24  /// classes TMPClient and TMPWorker.
25  ///
26  //////////////////////////////////////////////////////////////////////////
27 
28  enum EMPCode : unsigned {
29  //not an enum class because we want to be able to easily cast back and forth from unsigned
30  /* TProcessExecutor::Map */
31  kExecFunc = 0, ///< Execute function without arguments
32  kExecFuncWithArg, ///< Execute function with the argument contained in the message
33  kFuncResult, ///< The message contains the result of a function execution
34  /* TProcessExecutor::MapReduce */
35  kIdling = 100, ///< We are ready for the next task
36  kSendResult, ///< Ask for a kFuncResult/kProcResult
37  /* TTreeProcessorMP::Process */
38  kProcFile = 200, ///< Tell a TMPWorkerTree which tree to process. The object sent is a TreeInfo
39  kProcRange, ///< Tell a TMPWorkerTree which tree and entries range to process. The object sent is a TreeRangeInfo
40  kProcTree, ///< Tell a TMPWorkerTree to process the tree that was passed to it at construction time
41  kProcSelector, ///< Tell a TMPWorkerTree to process the tree using the selector passed to it at construction time
42  kProcResult, ///< The message contains the result of the processing of a TTree
43  kProcEnded, ///< Tell the client we are done processing (i.e. we have reached the target number of entries to process)
44  kProcError, ///< Tell the client there was an error while processing
45  /* Generic messages, including errors */
46  kMessage = 1000, ///< Generic message
47  kError, ///< Error message
48  kFatalError, ///< Fatal error: whoever sends this message is terminating execution
49  kShutdownOrder, ///< Used by the client to tell servers to shutdown
50  kShutdownNotice, ///< Used by the workers to notify client of shutdown
51  kRecvError ///< Error while reading from the socket
52  };
53 }
54 
55 #endif
This namespace prevents conflicts between MPCode::kError and ELogLevel::kError.
Definition: MPCode.h:18
Error message.
Definition: MPCode.h:47
Error while reading from the socket.
Definition: MPCode.h:51
Ask for a kFuncResult/kProcResult.
Definition: MPCode.h:36
The message contains the result of the processing of a TTree.
Definition: MPCode.h:42
Used by the workers to notify client of shutdown.
Definition: MPCode.h:50
Tell a TMPWorkerTree which tree to process. The object sent is a TreeInfo.
Definition: MPCode.h:38
Fatal error: whoever sends this message is terminating execution.
Definition: MPCode.h:48
The message contains the result of a function execution.
Definition: MPCode.h:33
Tell a TMPWorkerTree which tree and entries range to process. The object sent is a TreeRangeInfo...
Definition: MPCode.h:39
Execute function with the argument contained in the message.
Definition: MPCode.h:32
Tell the client we are done processing (i.e. we have reached the target number of entries to process)...
Definition: MPCode.h:43
Tell a TMPWorkerTree to process the tree that was passed to it at construction time.
Definition: MPCode.h:40
Used by the client to tell servers to shutdown.
Definition: MPCode.h:49
EMPCode
An enumeration of the message codes handled by TProcessExecutor, TTreeProcessorMP, TMPWorker, TMPWorkerTree and by the low level classes TMPClient and TMPWorker.
Definition: MPCode.h:28
Tell a TMPWorkerTree to process the tree using the selector passed to it at construction time...
Definition: MPCode.h:41
Generic message.
Definition: MPCode.h:46
Tell the client there was an error while processing.
Definition: MPCode.h:44
We are ready for the next task.
Definition: MPCode.h:35
Execute function without arguments.
Definition: MPCode.h:31